#include <stdio.h>
#include <tcr.cc>
#include <math.h>

int main()
{
	int xx, xy, yx, yy, px, py;
	Point x, y, p;
	Point dist;
	double ddist;

	scanf("%d %d %d %d %d %d", &xx, &xy, &yx, &yy, &px, &py);
	if(xx == 0 && xy == 0 && yx == 0 && yy == 0 && px == 0 && py == 0)
		return 0;
	x.x = xx, x.y = xy, y.x = yx, y.y = yy, p.x = px, p.y = py;
	x.z = y.z = p.z = 1;

	dist = dist2_pt_line(p, cross(x, y));
	ddist = (double) dist.x;
	ddist /= dist.z;
	ddist = sqrt(ddist);

	printf("%f\n", ddist);

	return main();
}
